<meta title="新增采集源" width="800px" />
<form id="form" s="valid,form"
      s-form="{done: createDone}"
      action="/api/collectionSource" method="post" class="form-horizontal p">
    <div class="form-group ">
        <label class="col-lg-2 control-label text-danger">* 标题</label>
        <div class="col-lg-10">
            <input autocomplete="off" s-valid-error="require(),len(2,255)" type="text"
                   name="title"
                   class="form-control"  placeholder="标题"/>
        </div>
    </div>
    <div class="form-group ">
        <label class="col-lg-2 control-label text-danger">关键字</label>
        <div class="col-lg-10">
            <input autocomplete="off" type="text" name="keyword" class="form-control"  placeholder="关键字"/>
        </div>
    </div>
    <div class="form-group ">
        <label class="col-lg-2 control-label text-danger">* 采集页数</label>
        <div class="col-lg-10">
            <input autocomplete="off" s-valid-error="require(),len(1,255)" type="text"
                   name="maxPage"
                   class="form-control"  placeholder="采集页数"/>
        </div>
    </div>
    <div class="form-group ">
        <label class="col-lg-2 control-label text-danger">* 每页数量</label>
        <div class="col-lg-10">
            <input autocomplete="off" s-valid-error="require(),len(1,255)" type="text"
                   name="pageSize" value="100"
                   class="form-control"  placeholder="每页数量"/>
        </div>
    </div>
    <div class="form-group ">
        <label class="col-lg-2 control-label text-danger">* 采集类型</label>
        <div class="col-lg-10 form-inline">
            <select class="form-control" s="select"
                    name="type"
                    s-build="S.get('/api/enum/valuesMap/core.enums.CollectionSourceType')" s-data="'KEYWORD'"></select>

        </div>
    </div>
    <div class="form-group ">
        <label class="col-lg-2 control-label text-danger">* 状态</label>
        <div class="col-lg-10 form-inline">
            <select class="form-control" s="select"
                    name="status"
                    s-build="S.get('/api/enum/valuesMap/core.enums.CollectionSourceStatus?igNames=DELETED')" s-data="'STARTED'"></select>

        </div>
    </div>
    <button type="submit" class="btn btn-primary" style="display: none" >保存</button>
</form>
<script>
    S.meta.btns = [
        {
            id: "saveBtn",
            name: "保存",
            style: "btn btn-primary",
            click: function(){
                return $form.submit();
            }
        },
        {
            name: "关闭",
            style: "btn btn-default",
            click: function(){
                S.close();
            }
        }
    ];
    function createDone(rs){
        S.close(rs);
    }
</script>